﻿namespace SmartPlant.Model.DbContext.Biz
{
    public class TaskJob
    {
        /// <summary>
        /// 工作ID
        /// </summary>
        public Guid ID { get; set; }
        /// <summary>
        /// 附件MD5
        /// </summary>
        public string? MD5 { get; set; }
        /// <summary>
        /// 用户名称
        /// </summary>
        public string USER_NAME { get; set; }
        /// <summary>
        /// 创建日期
        /// </summary>
        public DateTime? CREATIONDATE { get; set; }
        /// <summary>
        /// 服务器信息
        /// </summary>
        public string? DOMAINS { get; set; }
        /// <summary>
        /// 功能名称
        /// </summary>
        public string? ACTION { get; set; }
        /// <summary>
        /// 已完成
        /// </summary>
        public int FINISHED { get; set; } = 0;

        /// <summary>
        /// 文件名称
        /// </summary>
        public string FILE_NAME { get; set; }
        /// <summary>
        /// 进度百分比
        /// </summary>
        public decimal PROGRESS { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string NOTE { get; set; }
        public string Finished
        {
            get
            {
                if (FINISHED == 1)
                {
                    return "是";
                }
                else
                {
                    return "否";
                }
            }
        }
        public string Progress
        {
            get
            {
                return PROGRESS + "%";
            }
        }
    }
}
